import com.csd.mapper.*;
import com.csd.po.Admin;
import com.csd.po.PageOrder;
import com.csd.po.SysOrder;
import com.csd.po.SysUser;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

/**
 * @program: CeSuDi_SSM
 * @author: qinjianbao
 * @create: 2020-12-22 17:57
 * @Version: 1.0
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:spring-mybatis.xml")

public class test {
    @Autowired(required = false)
    private SysAdminMapper sysAdminMapper;
    @Test
    public void ss(){
        System.out.println(sysAdminMapper.findSysUser());
    }
@Test
    public void testDel(){
        sysAdminMapper.deleteSysUserById(7);
}
    @Test
    public void testUpdate(){
        sysAdminMapper.updateUser(new SysUser());
    }

    @Autowired(required = false)
    private SysOrderMapper orderMapper;
    @Test
    public void bb(){

        List<PageOrder> list = orderMapper.selectAll(2);
        for (PageOrder pageOrder:list){
            System.out.println(list);
        }

/*
        sysOrderMapper.addOrder(0,0,0,0,0.0,"qin");
*/


    }
}
